/*
 * @Date: 2024-11-04 10:46:48
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2024-11-04 10:47:44
 * @Description: 按钮大小
 */
import { PojoUtils } from '../cfg/PojoUtils'


/**
 * 按钮类型定义
 */
export class ButtonSize {
  constructor (label, value) {
    this.label=label
    this.value=value
  }

  static get DEFAULT() {
    return new ButtonSize('default', 'default')
  }
  static get LARGE() {
    return new ButtonSize('large', 'large')
  }
  static get SMALL() {
    return new ButtonSize('small', 'small')
  }
}

/**
 * 按钮的类型数据集
 */
export class ButtonSizes {
  /**
   * 获取选框类型的数组
   * 
   * @returns {Array}
   */
  static getData () {
    const staticKeys = PojoUtils.getOwnPropertyStatics(ButtonSize)
    const staticItems = staticKeys.map(key => ButtonSize[key])
    return staticItems
  }
}